<?php
if(1<2)
{
    $a=1;
}else    
{
    $b=2;
}

 $a=100;
f();

function f()
{
    echo $GLOBALS["a"];
}